#lang racket
(provide define-class define-class*)

(define-syntax define-class
  (syntax-rules (super super-new)
    [(define-class name (super sup) b ... (super-new a ...))
     (define name (class sup b ... (super-new a ...)))]
    [(define-class name (super sup) b  ...)
     (define name (class sup  b ... (super-new)))]
    [(define-class name  b ...)
     (define name (class object%  b ... (super-new)))]))

(define-syntax define-class*
  (syntax-rules (super super-new)
    [(define-class* name (super sup) (inher ...) b ... (super-new a ...))
     (define name (class* sup (inher ...) b ... (super-new a ...)))]
    [(define-class* name (super sup) (inher ...) b  ...)
     (define name (class* sup (inher ...)  b ... (super-new)))]
    [(define-class* name (inher ...) b ...)
     (define name (class* object% (inher ...) b ... (super-new)))]))
    